home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 110 / EnigmaAmiga110CD.iso / software / varie / stfax_upd41 / update stfax < prev    next >
Text File  |  2000-02-29  |  7KB  |  260 lines

  1. ; $VER: STFax-Update 1.6 (17.8.99)
  2. ;
  3. ; Script by Simone Tellini <wiz@vapor.com>
  4. ;
  5.  
  6. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7. ;  set initial variables
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9.  
  10. (set @app-name     "STFax Professional")
  11. (set OldVersion    "4.0")
  12. (set NewVersion    "4.1")
  13. (set OldFile       "STFax:STFax")
  14. (set OldSize       598780)
  15. (set PatchFile     "STFax.patch")
  16. (set @error-msg    "An unexpected error has occured. Installation aborted.")
  17. (set @default-dest "STFax:")
  18.  
  19. (if (= (exists OldFile (noreq)) 0)
  20.     (if (= (exists (cat OldFile ".old") (noreq)) 0)
  21.         (abort @app-name OldVersion " has not been found!")
  22.         (set OldFile (cat OldFile ".old"))
  23.     )
  24. )
  25.  
  26. (if (<> (getsize OldFile) OldSize)
  27.     (abort @app-name " has a different size than the expected one, "
  28.            "patch can't be applied.")
  29. )
  30.  
  31. (complete 0)
  32.  
  33. (welcome)
  34.  
  35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  36. ;  Patch the file
  37. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  38.  
  39. (if (<> OldFile "STFax:STFax.old")
  40.   (
  41.     (if (exists "STFax:STFax.old")
  42.         (delete "STFax:STFax.old")
  43.     )
  44.  
  45.     (rename OldFile "STFax:STFax.old")
  46.  
  47.     (set OldFile (cat OldFile ".old"))
  48.   )
  49. )
  50.  
  51. (complete 20)
  52.  
  53. (working "Applying the patch...")
  54.  
  55. (run (cat "Patch " OldFile " STFax:STFax " PatchFile)
  56.     (prompt "Applying the patch...")
  57. )
  58.  
  59. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  60. ;  Copy FaxViewer / Phonebook
  61. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  62.  
  63. (if (exists "Phonebook")
  64.     (copyfiles
  65.         (source "Phonebook")
  66.         (dest "STFax:")
  67.     )
  68. )
  69.  
  70. (if (exists "FaxViewer")
  71.     (copyfiles
  72.         (source "FaxViewer")
  73.         (dest "STFax:")
  74.     )
  75. )
  76.  
  77. (complete 25)
  78.  
  79. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  80. ;  Copy printer driver
  81. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  82.  
  83. (if (exists "Devs/Printers/STFaxPrt")
  84.     (copyfiles
  85.         (source "Devs/Printers/STFaxPrt")
  86.         (dest "DEVS:Printers")
  87.     )
  88. )
  89.  
  90. (complete 33)
  91.  
  92. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  93. ;  Copy docs, if they exists
  94. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  95.  
  96. (if (exists "STFax.guide")
  97.     (copyfiles
  98.         (source "STFax.guide")
  99.         (dest "STFax:")
  100.     )
  101. )
  102.  
  103. (complete 35)
  104.  
  105. (if (exists "History.txt")
  106.     (copyfiles
  107.         (source "History.txt")
  108.         (dest "STFax:")
  109.     )
  110. )
  111.  
  112. (complete 40)
  113.  
  114. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  115. ;  Copy modem init strings
  116. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  117.  
  118. (if (exists "Data/ModemInit.cfg")
  119.     (copyfiles
  120.         (source "Data/ModemInit.cfg")
  121.         (dest "STFax:Data")
  122.     )
  123. )
  124.  
  125. (complete 45)
  126.  
  127. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  128. ;  Install new catalogs
  129. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  130.  
  131. (if (exists "Catalogs")
  132.     (copyfiles
  133.         (prompt "Updating catalog files")
  134.         (help @copyfiles-help)
  135.         (source "Catalogs")
  136.         (dest "STFax:Catalogs")
  137.         (choices "italiano")
  138.         (confirm)
  139.     )
  140. )
  141.  
  142. (complete 60)
  143.  
  144. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  145. ;  Copy libraries
  146. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  147.  
  148. (if (exists "libs/STFax.library")
  149.     (copylib
  150.        (prompt "Installing a new STFax library...")
  151.        (help   "This will install the STFax.library")
  152.        (source "libs/STFax.library")
  153.        (dest   "STFax:libs")
  154.        (confirm)
  155.     )
  156. )
  157.  
  158. (if (exists "libs/vapor_toolkit.library")
  159.     (copylib
  160.        (prompt "Installing a new Vapor Toolkit library...")
  161.        (help   "This will install the vapor_toolkit.library")
  162.        (source "libs/vapor_toolkit.library")
  163.        (dest   "LIBS:")
  164.        (confirm)
  165.     )
  166. )
  167.  
  168. (complete 70)
  169.  
  170. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  171. ;  Copy SpeedBar.mcc
  172. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  173.  
  174.  
  175. (if (exists "MUI/SpeedBar.mcc")
  176.     (
  177.         (copylib
  178.            (prompt "Installing updated MUI classes... (SpeedBar.mcc)")
  179.            (help   "This will install some MUI classes needed by STFax")
  180.            (source "MUI/SpeedBar.mcc")
  181.            (dest   "MUI:Libs/MUI")
  182.            (confirm)
  183.         )
  184.  
  185.         (copylib
  186.            (prompt "Installing updated MUI classes... (SpeedBar.mcp)")
  187.            (help   "This will install some MUI classes needed by STFax")
  188.            (source "MUI/SpeedBar.mcp")
  189.            (dest   "MUI:Libs/MUI")
  190.            (confirm)
  191.         )
  192.  
  193.         (copylib
  194.            (prompt "Installing updated MUI classes... (SpeedButton.mcc)")
  195.            (help   "This will install some MUI classes needed by STFax")
  196.            (source "MUI/SpeedButton.mcc")
  197.            (dest   "MUI:Libs/MUI")
  198.            (confirm)
  199.         )
  200.  
  201.         (copylib
  202.            (prompt "Installing updated MUI classes... (SpeedBarCfg.mcc)")
  203.            (help   "This will install some MUI classes needed by STFax")
  204.            (source "MUI/SpeedBarCfg.mcc")
  205.            (dest   "MUI:Libs/MUI")
  206.            (confirm)
  207.         )
  208.     )
  209. )
  210.  
  211. (complete 80)
  212.  
  213. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  214. ;  Copy Textinput.mcc
  215. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  216.  
  217. (if (exists "MUI/Textinput.mcc")
  218.     (
  219.         (copylib
  220.            (prompt "Installing updated MUI classes... (Textinput.mcc)")
  221.            (help   "This will install some MUI classes needed by STFax")
  222.            (source "MUI/Textinput.mcc")
  223.            (dest   "MUI:Libs/MUI")
  224.            (confirm)
  225.         )
  226.  
  227.         (copylib
  228.            (prompt "Installing updated MUI classes... (Textinput.mcp)")
  229.            (help   "This will install some MUI classes needed by STFax")
  230.            (source "MUI/Textinput.mcp")
  231.            (dest   "MUI:Libs/MUI")
  232.            (confirm)
  233.         )
  234.  
  235.         (copylib
  236.            (prompt "Installing updated MUI classes... (Textinputscroll.mcc)")
  237.            (help   "This will install some MUI classes needed by STFax")
  238.            (source "MUI/Textinputscroll.mcc")
  239.            (dest   "MUI:Libs/MUI")
  240.            (confirm)
  241.         )
  242.     )
  243. )
  244.  
  245. (complete 90)
  246.  
  247. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  248. ;  End
  249. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  250.  
  251. (message @app-name " has been upgraded from version " OldVersion " to " NewVersion
  252.          "\n\nThe old STFax version has been renamed as STFax:STFax.old")
  253.  
  254. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  255. ;  All done.
  256. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  257.  
  258. (complete 100)
  259.  
  260.